home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
batch
/
library
/
echon
/
echon.doc
< prev
next >
Wrap
Text File
|
1987-11-13
|
1KB
|
26 lines
EchoN - Echo command line without going to a new line.
by D.J. Murdoch, 13 Nov 1987
This handy little program works like ECHO, but doesn't do a new line at the end.
I use it in batch files to save a directory:
ECHON cd >\olddir.bat
CD >>\olddir.bat
This puts the "cd " into the file olddir.bat in the root directory, then lists
the current directory into that file on the same line. Executing OLDDIR any
time after that puts you back into the original directory. Unlike PUSHDIR and
POPDIR, this lasts after you reboot your computer.
Here's source code, that could be assembled using DEBUG if ECHON.COM is missing:
MOV CL,[0080] ; Put line length into CL
SUB CX,+01 ; Subtract 1 to get rid of initial blank
JL 0115 ; Quit if there were no characters
MOV BX,0001 ; Output to Standard Output...
MOV DX,0082 ; from command line, starting at the 2nd char...
MOV AH,40 ; using the write service...
INT 21 ; do it!
INT 20 ; quit